﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RuKuTuTong_ZhiJian.aspx.cs" Inherits="syc.ZhiJian.RuKuTuTong_ZhiJian" %>
<html>
<head runat="server">
<title>入库通知书判定管理</title>    

<script type="text/javascript" language="javascript" src="/common.js"></script>

</head>
<body onload="load()">
    <form id="form1" runat="server">
    <div class="wintop">入库通知书判定管理</div>    
     <asp:Panel ID="Panel2" runat="server" CssClass="panel" GroupingText="查 询">       
        生产单位：  
        <asp:DropDownList ID="FenChang" runat="server"  Width="120px" 
            AutoPostBack="True" onselectedindexchanged="FenChang_SelectedIndexChanged">    
           <asp:ListItem  Value="0">全部</asp:ListItem> 
           <asp:ListItem  Value="1">一分厂</asp:ListItem>
           <asp:ListItem  Value="2">二分厂</asp:ListItem>
           <asp:ListItem  Value="5">五分厂</asp:ListItem>           
        </asp:DropDownList>
        原料供货单位：<asp:DropDownList ID="GongHuo" runat="server" 
            DataSourceID="SqlDataSource4" DataTextField="名称" DataValueField="ID" 
            Width="120px">
        </asp:DropDownList>
        判定状态：<asp:DropDownList ID="Status" runat="server">
            <asp:ListItem Value="3">全部</asp:ListItem>
            <asp:ListItem Value="1">合格</asp:ListItem>
            <asp:ListItem Value="0">不合格</asp:ListItem>
        </asp:DropDownList>
        <div id="shengchanxian" runat="server">
    生产线: <asp:DropDownList ID="DropDownList2" runat="server" 
                AutoPostBack="True" onselectedindexchanged="DropDownList2_SelectedIndexChanged">
            <asp:ListItem Value="0">全部</asp:ListItem>
            <asp:ListItem Value="1">一号线</asp:ListItem>
            <asp:ListItem Value="2">二号线</asp:ListItem>
        </asp:DropDownList>
        </div>
        <br />
<asp:SqlDataSource ID="DS_ChanPin" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    SelectCommand="SELECT [ID],[品名]+' '+[钢级]+' '+[规格] AS 名称 FROM [产品]"></asp:SqlDataSource>
产品类别：<asp:DropDownList ID="ChanPin" runat="server" Width="150px" Font-Size="12px" DataSourceID="DS_ChanPin" DataTextField="名称" DataValueField="ID">

</asp:DropDownList>
        入库序号： 
        <asp:TextBox ID="XuHao" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox>
        入库日期：<asp:TextBox ID="Date1" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox>
        <img align="middle" alt="" 
            onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" 
            src="/Icons/29.png" />
        至 <asp:TextBox ID="Date2" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />
        <asp:Button ID="Button_Query" runat="server" Text="筛 选" CssClass="wsbutton" 
            UseSubmitBehavior="False" onclick="Button_Query_Click" />

        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
            SelectCommand="SELECT 0 as [ID], '全部' as [产品类别] UNION SELECT [ID], [品名]+'('+[钢级]+')'+[规格] as [产品类别] FROM [产品]"></asp:SqlDataSource>
        
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
            SelectCommand="SELECT 0 as [ID], '全部' as [名称] UNION SELECT [ID], [名称] FROM [原料供货单位]"></asp:SqlDataSource>
            
    </asp:Panel>
     <asp:Panel ID="Panel3" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
     <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	            <tr>
		            <td class="grid-title">产品判定入库通知书</td>
		        </tr>
		        <tr>
		            <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"></asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                            DataSourceID="SqlDataSource1" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <Columns>
                              
                              <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:Button ID="Button1" runat="server" CommandName="Select" Text="选择" CssClass="hide"/>
                                        <img src="/Icons/online.gif" style="margin-top:2px;" alt="" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="产品类别" HeaderText="产品类别" InsertVisible="False"  
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    SortExpression="ID" ItemStyle-Width="100" 
                                    ItemStyle-HorizontalAlign="Center" ReadOnly="True" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="生产单位" SortExpression="生产单位">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("生产单位") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="原料供货单位" SortExpression="原料供货单位">
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("原料供货单位") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="200px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="入库序号" SortExpression="入库序号">
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Eval("入库序号") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="50px" />
                                </asp:TemplateField>   
                                
                                <asp:TemplateField HeaderText="炉号" SortExpression="炉号">
                                    <ItemTemplate>                                      
                                         <asp:Label ID="Label6" runat="server" Text='<%# Eval("炉号") %>'></asp:Label> 
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="200px" />
                                </asp:TemplateField>                              
                                <asp:TemplateField HeaderText="总重量" SortExpression="总重量">
                                    <ItemTemplate>
                                        <asp:Label ID="Label7" runat="server" Text='<%# Eval("总重量") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="70px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="总长度" SortExpression="总长度">
                                    <ItemTemplate>
                                        <asp:Label ID="Label8" runat="server" Text='<%# Eval("总长度") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="70px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="总件数" SortExpression="总件数">
                                    <ItemTemplate>
                                        <asp:Label ID="Label9" runat="server" Text='<%# Eval("总件数") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="60px" />
                                </asp:TemplateField>
   
                                
                                <asp:TemplateField HeaderText="日期" SortExpression="日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label10" runat="server" Text='<%# Bind("日期","{0:d}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="90px" />
                                </asp:TemplateField>               
                                 <asp:BoundField DataField="检定日期" HeaderText="检定日期" SortExpression="检定日期"
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="80" 
                                     DataFormatString="{0:d}" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
                                </asp:BoundField >
                                 <asp:TemplateField HeaderText="是否合格" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="80" >
                                    <ItemTemplate>                                                                           
                                        <asp:CheckBox ID="CheckBox1" runat="server"  Checked='<%# Bind("是否合格") %>' ToolTip='<%# Eval("ID") %>' oncheckedchanged="CheckBox1_CheckedChanged" AutoPostBack="True"
                                             ></asp:CheckBox>
                                    </ItemTemplate>

<HeaderStyle CssClass="grid-header"></HeaderStyle>
                                   <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:TemplateField>
                                <asp:TemplateField ShowHeader="False">
                                    <ItemTemplate>
<input id="mxbu" type="button" value="明细" class="smallbutton" onclick="parent.swin2_load('/FC/产品判定入库.aspx?id=<%#Eval("ID") %>',800,1000,'yes');" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <SelectedRowStyle CssClass="grid-row-selected" />
                            <HeaderStyle Font-Size="13px" />
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="Label_Total" runat="server" CssClass="grid_totalrows"></asp:Label>
                                </td>
                            </tr>
                       </table>

		            </td>
	            </tr>
            </table>
            

        </div>
    </div>   
<script type="text/javascript">
        var textboxs = document.getElementsByTagName("input");
        var i;
        for (i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "textbox") {
                textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
                textboxs[i].onfocus = function(e) { this.select(); };
            }
            else if (textboxs[i].className == "pageturn") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }

        }
        var rows = document.getElementsByTagName("tr");
        for (i = 0; i < rows.length; i++) {

            if (rows[i].className == "grid-row-normal") {
                rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
                rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
            }
        }
        var tds = document.getElementsByTagName("td");
        for (i = 0; i < tds.length; i++) {
            if (tds[i].className == "detailheader") {
                tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
            }
        }
					
</script>    
</form>
</body>
</html>
